how to calculate current value